
import requests

url = "http://www.baidu.com/"

response = requests.get(url)
response.encoding = 'utf-8'
print(response.text) #text 返回的是unicode 型的文本数据

#content属性 返回的是bytes
# data = response.content.decode('utf-8')
# print(data)